<template>
	<div class="wrap down">
        <nav-bar title="下载" right-text="" left-arrow @click-left="onClickLeft"/>
		<img class="logo" src="./../../assets/img/logo.jpg">
		<div class="from ex-rigster-form">
            <span v-if="and"><i class="fa fa-android fa-lg" aria-hidden="true"></i><b>GSHMALL</b><b>企业版</b></span>
            <span v-if="ios"><i class="fa fa-apple fa-lg" aria-hidden="true"></i><b>GSHMALL</b><b>企业版</b></span>
            <span>版本：1.0.1(build16) 大小：1.3MB</span>
            <span>更新时间：2018-04-14</span>
			<input class="l_button" type="button" value="点击安装" @click = "down()">
		</div>
	</div>
</template>
<script>
    import { Dialog,NavBar } from 'vant';
	export default {
		data(){
			return {
                ios: this.Tools.config.IsIos,
                and: this.Tools.config.IsAnd,
            }
		},
        methods:{
            onClickLeft(){
                this.$router.push({path:'setting'})
            },
            down(){
                if(this.Tools.config.IsWeiXin == true){
                    Dialog.alert({
                        title: '温馨提示',
                        message: '请点击右上角复制链接，在浏览器中打开'
                    }).then(() => {
                        
                    });
                }else{
                    if(this.ios == true){
                        Dialog.confirm({
                        title: '温馨提示',
                        message: 'IOS应用还未上线，是否去登录？'
                        }).then(() => {
                            this.$router.push('/login')
                        })             
                    }else{
                       window.location.href = '/download/app-release-3.apk';
                    }
                }
            }
        },
		components: {
            Dialog,NavBar
		},
	}
</script>
<style scoped>
.wrap{width: 100%; position: absolute; height: 100%; background: #fff;}
.down .logo{ width: 35%; display: block; margin: 20% auto 2%;}
.down .from{ padding: .5rem 1.2rem .5rem; margin: 2% auto 0; color: #6F6F6F;}
.down .from span{ text-align: center; display: block; color: #333; font-size: .35rem; margin: .5rem 0;}
.down .from span b{ font-weight: normal;}
.down .from span b:nth-of-type(1){ margin: 0 .3rem;}
.down .from span b:nth-of-type(2){ background: #23A332; color: #fff; padding: .1rem .2rem; border-radius: 3px;}
.down .from .l_button{ width: 60%; display: block; margin: 15% auto 0; padding: .25rem 0; background: #23A332; text-align: center; font-size: .4rem; color: #fff; border-radius: 100px;}

</style>


